var config = {};
config.pageSize = 20;
config.pageList = [10,20,30,40,50,100,200,500];


//检查是否存在全角符号
//True 没有全角，False有全角
function islegal(str)
{
    for (var i = 0; i < str.length; i++){
        strCode = str.charCodeAt(i);
        if ((strCode > 65248) || (strCode == 12288)){
            return false;
        }
    }
    return true;
}

/**
 * 正数校验
 */
var positiveValidate = function(e) {
	if (!isNaN(e)) {
		if(e.trim()==""){
			return false;
		}
		if (e.indexOf('0') == 0) {
			if (e.indexOf('.') == 1) {
				return true;
			} else {
				return false
			}
		} else {
			return true;
		}
	} else {
		return false;
	}
};

/**
 * 百分数校验
 */
var percentNumValidate = function(e) {
	if (!isNaN(e)) {
		if(e.trim()==""){
			return false;
		}
		if (parseFloat(e)>100||parseFloat(e)<0){
			return false;
		}
		if (e.indexOf('0') == 0) {
			if (e.indexOf('.') == 1) {
				return true;
			} else {
				return false
			}
		} else {
			return true;
		}
	} else {
		return false;
	}
};

function clone(obj) {
  // Handle the 3 simple types, and null or undefined
  if (null == obj || "object" != typeof obj) return obj;
 
  // Handle Date
  if (obj instanceof Date) {
    var copy = new Date();
    copy.setTime(obj.getTime());
    return copy;
  }
 
  // Handle Array
  if (obj instanceof Array) {
    var copy = [];
    for (var i = 0, len = obj.length; i < len; ++i) {
      copy[i] = clone(obj[i]);
    }
    return copy;
  }
 
  // Handle Object
  if (obj instanceof Object) {
    var copy = {};
    for (var attr in obj) {
      if (obj.hasOwnProperty(attr)) copy[attr] = clone(obj[attr]);
    }
    return copy;
  }
 
  throw new Error("Unable to copy obj! Its type isn't supported.");
}

function getArray(list) {
	var array = [];
	for(var i in list) {
		array.push(list[i]);
	}
	return array;
}

function cloneArray(obj) {  
    var o;  
    if (typeof obj == "object") {  
        if (obj === null) {  
            o = null;  
        } else {  
            if (obj instanceof Array) {  
                o = []; 
				for (var j in obj) {
                    o[j] = clone(obj[j]);  
                }   
            } else {  
                o = {};  
                for (var j in obj) {
                	if(obj[j] == undefined) continue;
                    o[j] = clone(obj[j]);  
                }  
            }  
        }  
    } else {  
        o = obj;  
    }  
    return o;  
}

/**
 * 去掉字符中所有空格
 */
var excludeSpace = function(e) {
	return e.replace(/(^\s*)|(\s*$)/g, '');
};

$(".number").blur(function() {
	var value = this.value;
	if(value) {
		if(!positiveValidate(value)) {
			$.messager.alert('系统提示',"只能输入数字！", 'info');
			this.value = null;
		}
	}
});

//验证姓名
function checkName(name) {
	if(!/^[\u2E80-\u9FFF]{2}/.test(name)){
		return false;
	}
	return true;
}

//验证手机号
function checkPhone(phone) {
	if(!/^(((13[0-9]{1})|(15[0-9]{1})|(17[0-9]{1})|(18[0-9]{1}))+\d{8})$/.test(phone)){
		return false;
	}
	return true;
}


function checkIdNo(value){
  if(value == null) return false;
  //验证身份证号方法
  var area = { 11: "北京", 12: "天津", 13: "河北", 14: "山西", 15: "内蒙古", 21: "辽宁", 22: "吉林", 23: "黑龙江", 31: "上海", 32: "江苏", 33: "浙江", 34: "安徽", 35: "福建", 36: "江西", 37: "山东", 41: "河南", 42: "湖北", 43: "湖南", 44: "广东", 45: "广西", 46: "海南", 50: "重庆", 51: "四川", 52: "贵州", 53: "云南", 54: "西藏", 61: "陕西", 62: "甘肃", 63: "青海", 64: "宁夏", 65: "xinjiang", 71: "台湾", 81: "香港", 82: "澳门", 91: "国外" }
  var idcard, Y, JYM;
  var idcard=value;
  var S, M;
  var idcard_array = new Array();
  idcard_array = idcard.split("");
  switch (idcard.length) {
      case 15:
          if ((parseInt(idcard.substr(6, 2)) + 1900) % 4 == 0 || ((parseInt(idcard.substr(6, 2)) + 1900) % 100 == 0 && (parseInt(idcard.substr(6, 2)) + 1900) % 4 == 0)) {
              ereg = /^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}$/; //测试出生日期的合法性
          }
          else {
              ereg = /^[1-9][0-9]{5}[0-9]{2}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}$/; //测试出生日期的合法性
          }
          if (ereg.test(idcard))
              //return Errors[0];
            var res = true;
          else
              //return Errors[2];
            var res = false;
          return res;
          break;
      case 18:
          if (parseInt(idcard.substr(6, 4)) % 4 == 0 || (parseInt(idcard.substr(6, 4)) % 100 == 0 && parseInt(idcard.substr(6, 4)) % 4 == 0)) {
              ereg = /^[1-9][0-9]{5}[1-9][0-9]{3}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|[1-2][0-9]))[0-9]{3}[0-9Xx]$/; //闰年出生日期的合法性正则表达式
          }
          else {
              ereg = /^[1-9][0-9]{5}[1-9][0-9]{3}((01|03|05|07|08|10|12)(0[1-9]|[1-2][0-9]|3[0-1])|(04|06|09|11)(0[1-9]|[1-2][0-9]|30)|02(0[1-9]|1[0-9]|2[0-8]))[0-9]{3}[0-9Xx]$/; //平年出生日期的合法性正则表达式
          }
          if (ereg.test(idcard)) {
              S = (parseInt(idcard_array[0]) + parseInt(idcard_array[10])) * 7 + (parseInt(idcard_array[1]) + parseInt(idcard_array[11])) * 9 + (parseInt(idcard_array[2]) + parseInt(idcard_array[12])) * 10 + (parseInt(idcard_array[3]) + parseInt(idcard_array[13])) * 5 + (parseInt(idcard_array[4]) + parseInt(idcard_array[14])) * 8 + (parseInt(idcard_array[5]) + parseInt(idcard_array[15])) * 4 + (parseInt(idcard_array[6]) + parseInt(idcard_array[16])) * 2 + parseInt(idcard_array[7]) * 1 + parseInt(idcard_array[8]) * 6 + parseInt(idcard_array[9]) * 3;
              Y = S % 11;
              M = "F";
              JYM = "10X98765432";
              M = JYM.substr(Y, 1);
              if (M == idcard_array[17])
                  //return Errors[0];
                var res = true;
              else
                  //return Errors[3];
                var res = false;
          }
          else
              //return Errors[2];
            res = false;
          return res;
          break;
      default:
          return /^[0-1a-zA-Z]{6,}$/.test(value);
          break;
    };
}


function getNullString(v){
	return (v == undefined || v == null) ? "" : v;
}

function emptyToNull(v) {
	if(v == undefined || v == null) {
		return null;
	}else if(v.trim().length == 0) {
		return null;
	}
	return v;
}

function nullToEmpty(v) {
	if(v == undefined || v == null) {
		return "";
	}
	return v;
}

function getTime(v, format) {
	if(v) return (new Date(v)).Format(format);
	return "";
}

function addDay(date, addNum) {
	var ms,thatDay;
	ms = date.getTime() + addNum*24*60*60*1000;
	thatDay = new Date(ms);
	return thatDay
}

function toDecimal(x) { 
    var f = parseFloat(x); 
    if (isNaN(f)) { 
      return; 
    } 
    f = Math.round(x*100)/100; 
    return f; 
} 

//对Date的扩展，将 Date 转化为指定格式的String    
//月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符，    
//年(y)可以用 1-4 个占位符，毫秒(S)只能用 1 个占位符(是 1-3 位的数字)    
//例子：    
//(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423    
//(new Date()).Format("yyyy-M-d h:m:s.S")      ==> 2006-7-2 8:9:4.18    
Date.prototype.Format = function(fmt)   
{    
var o = {   
 "M+" : this.getMonth()+1,                 //月份    
 "d+" : this.getDate(),                    //日    
 "h+" : this.getHours(),                   //小时    
 "m+" : this.getMinutes(),                 //分    
 "s+" : this.getSeconds(),                 //秒    
 "q+" : Math.floor((this.getMonth()+3)/3), //季度    
 "S"  : this.getMilliseconds()             //毫秒    
};   
if(/(y+)/.test(fmt))   
 fmt=fmt.replace(RegExp.$1, (this.getFullYear()+"").substr(4 - RegExp.$1.length));   
for(var k in o)   
 if(new RegExp("("+ k +")").test(fmt))   
fmt = fmt.replace(RegExp.$1, (RegExp.$1.length==1) ? (o[k]) : (("00"+ o[k]).substr((""+ o[k]).length)));   
return fmt;   
} 

function getDateDiff(publishTime, format) {
	publishTime = publishTime / 1000
    var d_seconds,
    d_minutes,
    d_hours,
    d_days,
    timeNow = parseInt(new Date().getTime() / 1000),
    d,
    date = new Date(publishTime * 1000),
    Y = date.getFullYear(),
    M = date.getMonth() + 1,
    D = date.getDate(),
    H = date.getHours(),
    m = date.getMinutes(),
    s = date.getSeconds();
    //小于10的在前面补0
    if (M < 10) {
        M = '0' + M;
    }
    if (D < 10) {
        D = '0' + D;
    }
    if (H < 10) {
        H = '0' + H;
    }
    if (m < 10) {
        m = '0' + m;
    }
    if (s < 10) {
       	s = '0' + s;
    }
    d = timeNow - publishTime;
    d_days = parseInt(d / 86400);
    d_hours = parseInt(d / 3600);
    d_minutes = parseInt(d / 60);
    d_seconds = parseInt(d);

    if (d_days > 0 && d_days < 3) {
            return d_days + '天前';
    } else if (d_days <= 0 && d_hours > 0) {
            return d_hours + '小时前';
    } else if (d_hours <= 0 && d_minutes > 0) {
            return d_minutes + '分钟前';
    } else if (d_seconds < 60) {
        if (d_seconds <= 0) {
                return '刚刚';
        } else {
                return d_seconds + '秒前';
        }
    } else {
    	if(format) return getTime(publishTime * 1000, format);
        return Y + '年' + M + '月' + D + '日 ' + H + ':' + m;
    }
}

var dgEdit = [];
var dgEditIndex = [];
function dgUpdate(id){
	if(dgEdit[id] != null){
		$.messager.alert('提示','请先保存或取消编辑！','info');
	}else{
		var dgObj = $('#' + id);
		var rows = dgObj.datagrid('getSelections');
		if(rows.length==1){			
			var cIndex = dgObj.datagrid('getRowIndex',rows[0]);	
			dgObj.datagrid('beginEdit',cIndex);
			dgEdit[id] = cIndex;
			dgEditIndex[id] = cIndex;
		}else{
			$.messager.alert('提示','请选择一行编辑！','info');	
		}
	}
}
function dgReject(id){
	$('#' + id).datagrid('rejectChanges');
	$('#' + id).datagrid("clearSelections");
	dgEdit[id] = null;
}
function dgAdd(id){
	var dgObj = $('#' + id);
	if(dgEdit[id] == null){	
		dgObj.datagrid('insertRow',{index:0,row:{}});
		dgObj.datagrid('beginEdit',0);
		dgEdit[id] = 0;
		dgEditIndex[id] = 0;
	}else{
		$.messager.alert('提示','请先保存或取消编辑！','info');
	}
}

function errorEdit(id) {
   var dgObj = $('#' + id);
   var rows = dgObj.datagrid('selectRow', dgEditIndex[id]);
   dgUpdate(id);
}

//获取url参数
function queryStringByName(name) {
	var result=window.location.search.match(new RegExp("[\?\&]" + name + "=([^\&]+)", "i"));
	if(result==null || result.length<0){	
		return null;	
	}	
	return result[1];
}

function getGroupChatKey(userRole, chatType, schoolId, grade, clazz) {
	return userRole + "_" + chatType + "_" + schoolId + "_" + grade + "_" + clazz;
}

function groupChatCache(userRole, schoolId, chatType, grade, gradeName, clazz) {
	var key = userRole + "_" + chatType + "_" + schoolId + "_" + grade + "_" + clazz;
	var param = window.localStorage.getItem(key);
	if(param == null) {
		param = {
			grade: parseInt(grade),
			gradeName: gradeName,
			clazz: parseInt(clazz),
			schoolId: parseInt(schoolId),
			chatType: chatType,
			startDate: new Date().getTime()
		}
	}else {
		param = JSON.parse(param);
		param.startDate = new Date().getTime();
	}
	window.localStorage.setItem(key, JSON.stringify(param));
}
function changeGroupChatValue(userRole, schoolId, chatType, grade, clazz, messageDate, message) {
	var key = userRole + "_" + chatType + "_" + schoolId + "_" + grade + "_" + clazz;
	var param = window.localStorage.getItem(key);
	var obj = JSON.parse(param);
	obj.startDate = new Date().getTime();
	obj.messageDate = messageDate;
	obj.message = message;
	window.localStorage.setItem(key, JSON.stringify(obj));
}

function getPrivateKey(userRole, chatType, schoolId, grade, clazz, studentId) {
	return userRole + "_" + chatType + "_" + schoolId + "_" + grade + "_" + clazz + "_" + studentId;
}

function privateChatCache(userRole, schoolId, chatType, grade, clazz, studentId, studentName) {
	var key = userRole + "_" + chatType + "_" + schoolId + "_" + grade + "_" + clazz + "_" + studentId;
	var param = window.localStorage.getItem(key);
	if(param == null) {
		param = {
			grade: parseInt(grade),
			clazz: parseInt(clazz),
			schoolId: parseInt(schoolId),
			chatType: chatType,
			studentId: (studentId),
			studentName: studentName,
			startDate: new Date().getTime()
		}
	}else {
		param = JSON.parse(param);
		param.startDate = new Date().getTime();
	}
	window.localStorage.setItem(key, JSON.stringify(param));
}

function changeprivateChatValue(userRole, schoolId, chatType, grade, clazz, studentId, messageDate, message) {
	var key = userRole + "_" + chatType + "_" + schoolId + "_" + grade + "_" + clazz + "_" + studentId;
	var param = window.localStorage.getItem(key);
	var obj = JSON.parse(param);
	obj.startDate = new Date().getTime();
	obj.messageDate = messageDate;
	obj.message = message;
	window.localStorage.setItem(key, JSON.stringify(obj));
}

function getReqChatList(userRole) {
	var array = [];
	var storage = window.localStorage; 
	for (var i=0, len = storage.length; i < len; i++) {
		var key = storage.key(i);
		if(key.indexOf(userRole + "_private") != -1 || key.indexOf(userRole + "_group") != -1) {
			var value = storage.getItem(key); 
			var obj = JSON.parse(value);
			var model = {};
			model.startDate = getTime(obj.startDate,'yyyy-MM-dd hh:mm:ss');
			model.chatType = obj.chatType;
			model.grade = obj.grade;
			model.clazz = obj.clazz;
			if(key.indexOf(userRole + "_private") != -1) {
				model.studentId = obj.studentId;
			}
			model.schoolId = obj.schoolId;
			array.push(model);
		}
	}
	if(array.length > 1) {
		array.sort(function(a,b){
            return b.startDate - a.startDate;
        });
	}
	return array;
}

function getChatList(userRole) {
	var array = new Array();
	var storage = window.localStorage; 
	var idx = 0;
	for (var i=0, len = storage.length; i < len; i++) {
		var key = storage.key(i);
		if(key.indexOf(userRole + "_private") != -1 || key.indexOf(userRole + "_group") != -1) {
			var value = storage.getItem(key); 
			var obj = JSON.parse(value);
			array[idx] = obj;
			idx++;
		}
	}
	if(array.length > 1) {
		array.sort(function(a,b){
            return b.startDate - a.startDate;
        });
	}
	return array;
}

function getGradeName(term, grade) {
	term = parseInt(term);
	grade = parseInt(grade);
	var v = term - grade;
	if(v == 0) return "一年级";
	else if(v == 1) return "二年级"; 
	else if(v == 2) return "三年级"; 
	else if(v == 3) return "四年级"; 
	else if(v == 4) return "五年级"; 
	else if(v == 5) return "六年级"; 
}
function getGradeName1(term, grade) {
	term = parseInt(term);
	grade = parseInt(grade);
	var v = term - grade;
	if(v == 0) return "一";
	else if(v == 1) return "二"; 
	else if(v == 2) return "三"; 
	else if(v == 3) return "四"; 
	else if(v == 4) return "五"; 
	else if(v == 5) return "六";
	else {
		return "已毕业" + grade + "届";
	}
}

function back() {
	window.location.href=window.history.back();
}

function imgDel(thiz) {
	$.confirm("您确定要删除此照片吗?", "确认删除?", function() {
		 attachDel(thiz);
    }, function() {
    });
}
function fileDel(thiz) {
	$.confirm("您确定要删除此文件吗?", "确认删除?", function() {
		 attachDel(thiz);
   }, function() {
   });
}
function attachDel(thiz) {
	var attachId = $(thiz.parentNode).attr("data-id");
	 $.ajax({
	 		url : basePath + "/attachment/del",
	 		type : "post",
	 		data : {
	 			attachId: parseInt(attachId)
	 		},
	 		dataType : "json",
	 		async : false,
	 		success : function(data) {
	 			if(data.code != '000') {
	 				$.toast(data.msg, "cancel");
	 			}else {
	 				$(thiz).closest("li").remove();
	 			}
	 		}, error:function(){
	 			alert("删除照片异常");
     		}
	 	});
}

function back() {
	window.history.go(-1);
}

function imgClick(thiz) {
	var obj = $($(thiz).closest(".img-click")).find("img");
	var src = get_img(obj);
	var currSrc = thiz.src;
	var current;
	for(var i in src) {
		if(src[i] == currSrc) {
			current = i;
			break;
		}
	}
	img_preview(src[current], src);
}
function img_preview(current, urls){
   if(!current || urls.length == 0){
        return ;
   }

   WeixinJSBridge.invoke('imagePreview', { 
       'current': current,
       'urls': urls
   }); 
}
function get_img(obj){
	var m = [];
	for(var i=0; i<obj.length; i++){
		m[i] = obj[i].src;
	}
	return m;
}


function loadLeft() {
	window.slideleft = (function($) {

		  var listItem = $('.weui_cell_bd'),
		      listOpts = $('.slideleft');

		  var onthel = false, // 是否处于最左端
		      isScroll = false, // 列表是否滚动状态
		      initX = 0, // 初始X坐标
		      initY = 0, // 初始Y坐标
		      endX = 0, // 结束时X坐标
		      endY = 0, // 结束时Y坐标
		      moveX = 0, // listItem 移动的距离
		      expandLi = null; // 是否存在展开的list

		  var slideMaxWid = listOpts.width();

			var handleSlide = (function() {

		    listItem.on('touchstart',function(e){
		        // 判断有无已经展开的li，如果有，是否是当前的li，如果不是，将展开的li收起
		        if( expandLi ){
		          if( expandLi.parent().index()!==$(this).parent().index() ){
		            // 判断当前list是左滑还是上下滑
		            if( Math.abs(endY-initY) < Math.abs(endX-initX) ){
		              e.preventDefault();
		             }
		             expandLi.css('-webkit-transform','translateX('+0+'px)');
		          }
		        }

		       initX = e.targetTouches[0].pageX;
		       initY = e.targetTouches[0].pageY;

		       moveX = $(this).offset().left;

		       $(this).on('touchmove',function(e){

		          var curY = e.targetTouches[0].pageY;
		          var curX = e.targetTouches[0].pageX;
		          var X = curX - initX; // 不断获取移动的距离

		        $(this).removeClass('animated');

		        if( Math.abs(endY-initY)<Math.abs(endX-initX) ){

		          e.preventDefault();
		          if( moveX==0 ){
		            if( X>0 ) {
		              $(this).css('-webkit-transform','translateX('+0+'px)');
		            }else if( X<0 ){
		              if( X<-slideMaxWid ) X=-slideMaxWid;
		              $(this).css('-webkit-transform','translateX('+X+'px)');
		            }
		          }
		          // 已经处于最左
		          else if( moveX < 0 ){
		            onthel = true;
		            if( X>0 ) { // 向右滑
		              if( X-slideMaxWid>0 ){
		                $(this).css('-webkit-transform','translateX('+0+'px)');
		              }else{
		                $(this).css('-webkit-transform','translateX('+(X-slideMaxWid)+'px)');
		              }
		            }else { // 左滑
		              $(this).addClass('animated');
		              $(this).css('-webkit-transform','translateX('+0+'px)');
		            }
		          }
		        }else{
		          isScroll = true;
		        }

		      })
		    })

		    listItem.on('touchend',function(e){

		        endX = e.changedTouches[0].pageX;
		        endY = e.changedTouches[0].pageY;
		        var X = endX - initX;

		        $(this).addClass('animated');
		        //Slide to right or the distance of slide to left less than 20;
		        if( X>-20||onthel||isScroll ){
		          $(this).css('-webkit-transform','translateX('+0+'px)');
		          onthel = false;
		          isScroll = false;
		        }else{
		          $(this).css('-webkit-transform','translateX('+(-slideMaxWid)+'px)');
		          expandLi = $(this);
		        }
		     })

		  })();

		})(Zepto);
}

function paragraph1() {
	$(".weui_panel .weui_media_bd").each(function(i, v) {
		//定义文本
		const paragraph = $($(this).find('.paragraph'));
		const paragraphText = paragraph.text();
		const paragraphLength = paragraph.text().length;
		//定义文章长度
		const maxParagraphLength = 80;
		//定义全文按钮
		const paragraphExtender = $($(this).find('.paragraphExtender'));
		if(paragraphExtender.hasClass('had')) return;
		paragraphExtender.addClass("had");
		paragraphExtender.unbind("click").html('全文');
		var toggleFullParagraph = false;
		
		//定义全文按钮
		if (paragraphLength < maxParagraphLength) {
		  paragraphExtender.hide();
		} else {
		  paragraph.html(paragraphText.substring(0, maxParagraphLength) + '...');
		  paragraphExtender.click(function(){
		    if (toggleFullParagraph) {
		      toggleFullParagraph = false;
		      paragraphExtender.html('全文');
		      paragraph.html(paragraphText.substring(0, maxParagraphLength) + '...');
		    } else {
		      toggleFullParagraph = true;
		      paragraphExtender.html('收起');
		      paragraph.html(paragraphText);
		    }
		  });
		};
	});
}
function getClazz(record) {
	$("#clazz").combobox('setValue', "");
	var url = basePath + "/common/getClazz?grade="+record;
	$('#clazz').combobox('reload',url);
}
/**
 * 模版下载操作
 */
function downloadTemplate(fileName){
	window.location.href= basePath + "/common/upload?fileName=" + encodeURI(encodeURI(fileName));
}

function scoreToGrade(gradeId, v1, fullScore, idx) {
	if(v1 == null) {
		return "缺考";
	}
	if(sysConfMap["成绩分数显示"] == 1) {
		return v1;
	}
	if(v1 >= 90) return "A";
	else if(v1 >= 80) return "B";
	else if(v1 >= 60) return "C";
	/*v1 = parseInt(parseFloat(v1)/parseInt(fullScore.split(",")[idx])*100);
	if(gradeId == 1 || gradeId == 2) {
		if(v1 >= 90) return "A";
		else if(v1 >= 85) return "B";
		else if(v1 >= 60) return "C";
	}else if(gradeId == 3 || gradeId == 4) {
		if(v1 >= 85) return "A";
		else if(v1 >= 80) return "B";
		else if(v1 >= 60) return "C";
	}else if(gradeId == 5 || gradeId == 6) {
		if(v1 >= 80) return "A";
		else if(v1 >= 75) return "B";
		else if(v1 >= 60) return "C";
	}*/
	return "D";
}
